<%--
  Created by IntelliJ IDEA.
  User: c
  Date: 2017-11-18
  Time: 15:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@include file="/WEB-INF/jsp/header.jsp"%>
</head>
<style>
    table td{
        font: 14px 'microsoft yahei', 微软雅黑, Helvetica, Arial, Tahoma, 黑体, 宋体, sans-serif;
    }
</style>
<body>
    <div style="margin-top: 18px;" class="container-fluid" width="80%">
        <div style="text-align: center">
            <span class="h3">药品采购计划登记</span>
        </div>
        <form class="submit" class="form-inline">
            <input type="hidden" name="planNum" value=""/>
            <table id="delTable" style="margin-top: 18px;" class="table table-bordered ">
                <tr >
                    <td colspan="3">
                        <%--<label class="control-label">供应商(药商)：</label>--%>
                            <div class="form-inline">
                                <label class=" control-label">供应商(药商)：</label>
                                <div class="input-group">
                                    <select style="width:250px;" class="form-control" id="proNum" name="proNum">
                                        <option value="-1">--请选择--</option>
                                    </select>
                                </div>
                            </div>
                    </td>
                    <td colspan="2">
                        <div class="form-inline">
                            <label class=" control-label">预定采购日期：</label>
                            <div class="form-group">
                                <input type="text" class="form-control" name="planDate"/>
                            </div>
                        </div>
                    </td>
                    <td colspan="1">
                        <div class="form-inline">
                            <label class=" control-label">采购员：</label>
                            <div class="input-group">
                                <select class="form-control" id="woJubnum" name="woJubnum">
                                    <option value="-1">--请选择--</option>
                                </select>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr id="back">
                    <th>药品名称</th>
                    <th>购进价格</th>
                    <th>批发价格</th>
                    <th>零售价格</th>
                    <th>购进数量</th>
                    <th>操作</th>
                </tr>
                <c:if test="${not empty purdetailsW}">
                    <c:forEach items="${purdetailsW}" var="pur">
                            <tr class="delsTr">
                                <td class="drugName1">
                                    <span class="dName">${pur.value.druginfo.drugName}</span>
                                    <input type="hidden" name="delQoh1" value="${pur.value.delQoh}">
                                    <input type="hidden" name="keyId1" value="${pur.key}">
                                </td>
                                <td class="delBuyprice1">${pur.value.delBuyprice}</td>
                                <td class="delRetailprice1">${pur.value.delRetailprice}</td>
                                <td class="delOneprice1">${pur.value.delOneprice}</td>
                                <td class="delBuynum1">${pur.value.delBuynum}</td>
                                <td><button class="layui-btn layui-btn-normal layui-btn-mini updateDrug" type="button" onclick="updateDetails(this)">编辑</button><button type="button" onclick="delDels(this)" class="layui-btn layui-btn-danger layui-btn-mini del">删除</button></td>
                            </tr>
                    </c:forEach>
                </c:if>
                <tr id="userAdd">
                    <td colspan="7">
                        <button class="pull-right layui-btn layui-btn-small layui-btn-normal" onclick="dengji()" type="button">登记药品信息</button>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                       <label class="control-label pull-right" style="font-size: 16px; line-height: 94px;">备注：</label>
                    </td>
                    <td colspan="4">
                        <textarea placeholder="请输入备注内容" class="layui-textarea" name="planRemark"></textarea>
                    </td>
                </tr>
            </table>
            <div style="text-align: center;">
                <button class="btn btn-success" onclick="subPurZhu()" type="button">提交审核</button>
                &nbsp;&nbsp;
                <button class="btn btn-primary" onclick="" type="button">重置</button>
            </div>
            <div style="text-align: center; margin-top: 10px;">
                <span style="color: red;" class="zhuErr">

                </span>
            </div>
        </form>
        <div id="addDrug">

        </div>
        <div id="updateDrug">

        </div>
        <div class="myForm" style="display: none;">
            <form action="" id="purDelForm" class="form-horizontal">
                <input type="hidden" name="planNum" value=""/>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">药品名称：</label>
                    <div class="form-group col-md-6">
                        <select style="width:260px;" class="form-control jiaDrugNum" onchange="searchDrugStock(this),checkSel(this)" id="drugNum" name="drugNum">
                            <option value="-1" class="bus">--请选择--</option>
                        </select>
                    </div>
                    <p class=" col-md-3" style="line-height: 34px; ">
                        <i style="color: red;">*</i>
                        <span class="checkSel" style="color: red;"></span>
                    </p>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">购进价格：</label>
                    <div class="form-group col-md-5">
                        <input type="text" onblur="checkdelBuyprice()" onfocus="" name="delBuyprice" class="form-control">
                    </div>
                    <p class=" col-md-4" style="line-height: 34px; ">
                        <i style="color: red;">*</i>
                        <span class="checkdelBuyprice"></span>
                    </p>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">批发价格：</label>
                    <div class="form-group col-md-5">
                        <input type="text" onblur="checkdelRetailprice()" name="delRetailprice" class="form-control">
                    </div>
                    <p class=" col-md-4" style="line-height: 34px; ">
                        <i style="color: red;">*</i>
                        <span class="checkdelRetailprice"></span>
                    </p>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">零售价格：</label>
                    <div class="form-group col-md-5">
                        <input type="text" onblur="checkdelOneprice()" name="delOneprice" class="form-control">
                    </div>
                    <p class=" col-md-4" style="line-height: 34px; ">
                        <i style="color: red;">*</i>
                        <span class="checkdelOneprice"></span>
                    </p>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">现有数量：</label>
                    <div class="form-group col-md-5">
                        <input type="text" readonly="readonly" name="delQoh" class="form-control" value="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="control-label col-md-3">购进数量：</label>
                    <div class="form-group col-md-5">
                        <input type="text" name="delBuynum" onblur="checkdelBuynum()" class="form-control">
                    </div>
                    <p class=" col-md-4" style="line-height: 34px; ">
                        <i style="color: red;">*</i>
                        <span class="checkdelBuynum" ></span>
                    </p>
                </div>
            </form>
        </div>
    </div>
    <%@include file="/WEB-INF/jsp/footer.jsp"%>
    <script src="${ctx}/res/js/draw.js"></script>
</body>
</html>
